var ME = (function(window){
    function sendRequest(url,methods,data,success,error,done){
        $.ajax({
            url : url,
            type : methods ? methods : 'POST',
            dataType : 'json',
            data : JSON.stringify(data),
            beforeSend : function(request) {
                    request.setRequestHeader("Content-Type", "application/json");
            },
            success : function(resp){
                success && success(resp)
            },
            error : function(err){
                error && error(err)
            },
            complete : function(){
                done && done()
            }
        })
    }
    return {
        sendRequest:sendRequest
    }
})(window);